package com.except;

public class Test2 {
    public static void main(String[] args) {
        int a=10;
        int b=0;

        try{
            int c=a/b;
        }catch (ArithmeticException e){
            System.out.println(e.getMessage()+"子类异常");
        }catch (Exception e){
            System.out.println(e.getMessage()+"父类异常");
        }
    }
}

